// ha tul kicsi az BOX, akkor kint jelenik meg a frame
function frame_position_set( obj ) {
	
	// csak akkor modosit, ha eppen nem vagyok move-ban vagy resize-ban
	if( !(resizedobj || draggedobj) ) {
		var top_bottom = 0;	// bottom = top, az nem kell
		var left_right = 0;	// right = left, az nem kell
		if( parseInt(obj.style.width) < 60 ) left_right = -12;
		if( parseInt(obj.style.width) < 40 ) left_right = -16;
	
		left( obj.id + "_move", left_right );
		right( obj.id + "_edit", left_right );
		left( obj.id + "_delete", left_right );
		right( obj.id + "_resize", left_right );
	
		if( parseInt(obj.style.height) < 60 ) top_bottom = -12;
		if( parseInt(obj.style.height) < 40 ) top_bottom = -16;
		top( obj.id + "_move", top_bottom );
		top( obj.id + "_edit", top_bottom );
		bottom( obj.id + "_delete", top_bottom );
		bottom( obj.id + "_resize", top_bottom );
	}
}

function show_frame( obj ) {
	if( obj != editedobj ) {
		show( obj.id + "_move" );
		show( obj.id + "_edit" );
		show( obj.id + "_delete" );
		show( obj.id + "_resize" );
	}
}

function hide_frame( obj ) {
	hide( obj.id + "_move" );
	hide( obj.id + "_edit" );
	hide( obj.id + "_delete" );
	hide( obj.id + "_resize" );
}

function show_frame_with_position_set( obj ) {
	frame_position_set( obj );
	show_frame( obj );
}